import { stringify } from "./json";

interface test {
  num: number,
  str: string,
  bol: boolean,
}

// 一般类型测试
const result1 = stringify(1)
const result2 = stringify("abc")
const result3 = stringify(true)
const result4 = stringify(undefined)

console.log(result1)
console.log(result2)
console.log(result3)
console.log(result4)

// 数组
const result5 = stringify([1, 2, 4, 5, 5, ["foo", "bar"]])
console.log(result5)

// 对象
const result6 = stringify({foo: 12, bar: "abc", bol: true, bb: [1,2,3]})
const result7 = stringify({
  foo: {
    bar: "bar"
  }
})
console.log(result6)
console.log(result7)